ObjectPool

StockSharp.Xaml.Charting.Common.Helpers

Represents a pool of objects with a size limit.

実装: IDisposable

コンストラクター

ObjectPool()

Initializes a new instance of the ObjectPool class.

ObjectPool(int, Func<T, T>)

Initializes a new instance of the ObjectPool class.

プロパティ

AvailableCount : int

Gets the amount of pooled instances

Count : int

Gets the summary amount of created instances

IsEmpty : bool

Gets the value indicating whether current ObjectPool instance is empty.

メソッド

Dispose()

Disposes of items in the pool that implement IDisposable.

Get() : T

Retrieves an item from the pool.

戻り値: The item retrieved from the pool.

Get(Func<T, T>) : T

Retrieves an item from the pool.

戻り値: The item retrieved from the pool.

Get(Func<T>) : T

Retrieves an item from the pool.

戻り値: The item retrieved from the pool.

Put(T)

Places an item in the pool.

item
The item to place to the pool.